package com.jprocms.module.cms.convert.guestbook;

import com.jpro.framework.common.pojo.PageResult;
import com.jprocms.module.cms.controller.admin.guestbook.vo.GuestbookCreateReqVO;
import com.jprocms.module.cms.controller.admin.guestbook.vo.GuestbookExcelVO;
import com.jprocms.module.cms.controller.admin.guestbook.vo.GuestbookRespVO;
import com.jprocms.module.cms.controller.admin.guestbook.vo.GuestbookUpdateReqVO;
import com.jprocms.module.cms.dal.dataobject.guestbook.GuestbookDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 留言板 Convert
 *
 * @author jprocms
 */
@Mapper
public interface GuestbookConvert {

    GuestbookConvert INSTANCE = Mappers.getMapper(GuestbookConvert.class);

    GuestbookDO convert(GuestbookCreateReqVO bean);

    GuestbookDO convert(GuestbookUpdateReqVO bean);

    GuestbookRespVO convert(GuestbookDO bean);

    List<GuestbookRespVO> convertList(List<GuestbookDO> list);

    PageResult<GuestbookRespVO> convertPage(PageResult<GuestbookDO> page);

    List<GuestbookExcelVO> convertList02(List<GuestbookDO> list);

}
